<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" type="text/css" href="../../css/style.css" />
		<link rel="stylesheet" type="text/css" href="../../css/demo.css" />
		<script src="../../js/demo.js" type="text/javascript" charset="utf-8"></script>
		<title>消息</title>
	</head>
	<body>
		<!--header-->
		<div class="header">
			<div class="header-content">
				<ul class="nav left">
					<li><img src="../../img/regist-arrow.png" /></li>
					<li class="nav-one">
						<a href="javascript:history.go(-1);">返回</a>
					</li>
					<li class="nav-two">
						<a href="../../">关闭</a>
					</li>
				</ul>
				<p class="left">消息</p>
				<div class="right nav_right">
					<img src="../../img/regist-list.png" />
				</div>
			</div>
		</div>
		<!--main-->
		<div class="main clear" style="margin-bottom: 1rem;">
			
		</div>
		<div class="static-img">
			<img src="../../img/regist-back.png"/>
		</div>
		<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
		<script type="text/javascript">
			//显示商铺信息
			selectShopBill();
			function selectShopBill(){
				//查询商铺信息
				$.ajax({
					type:"post",
					url:"/qiaomengapp/shopBill/api/selectShopBillWrapper",
					success:function(data){
						if(data.error!=undefined){
							alert(data.error);
						}else{
							for (var i in data) {
								var shopBillWrap = data[i];
								//判断信息是用户收货信息还是退款通知,实际收入
								var message;
								//实际收入保留两位小数
								var realMoneyStr = shopBillWrap.realMoney.toFixed(2);
								if(shopBillWrap.type==1){
									message = "恭喜店主<span> &nbsp;顾客收货</span>";
								}else{
									message = "非常遗憾<span> &nbsp;顾客进行退款</span>";
									realMoneyStr= "-"+realMoneyStr;
								}
								
								$(".main").append("<div class=''>"+
										"<div class='selfcenter-message'>"+
										"<div class='self-message'>"+
											"<div class='self-messagelist'>"+
												shopBillWrap.createTimeStr
											+"</div>"+
										"</div>"+
										"<div class='selfcenter-msg'>"+
											"<div class='msg-title'>"+
											"</div>"+
											"<ul class='msg-body'>"+
												"<li class='msg-body-one'>"+message+"</li>"+
												"<li class='msg-body-two'>订单编号："+shopBillWrap.billCode+"</li>"+
												"<li class='msg-body-thr'>"+
													"<span class='left'>收货商品：</span>"+
													"<p class='left' style='height:72px;'>"+shopBillWrap.goodDesc+"</p>"+
												"</li>"+
												"<li class='msg-body-fou clear'>实际收入：<span style='color: #fd6847;'>￥"+realMoneyStr+"</span></li>"+
											"</ul>"+
										"</div>"+
										"</div>"+
										"<div class='self-look'>"+
											"查看详情<img src='../../img/interface-icon2.png' alt='' style='width: 0.13rem;height: 0.23rem;float: right;margin-top: 0.25rem;margin-right: 0.32rem;'/>"+
										"</div>"+
									"</div>");
							}
						}
					}
				});
			}
		</script>
	</body>
</html>